package com.huibao.hulibao.adapter;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

import com.huibao.hulibao.R;

import java.util.ArrayList;

/**
 * Created by lizhaoyong on 2018/5/8.
 */
public class StartHuLiPopGvAdapter extends BaseAdapter {

    public String[] al_datas;
    public Context context;


    public StartHuLiPopGvAdapter(Context context, String[] al_datas) {
        this.context = context;
        this.al_datas = al_datas;

    }

    @Override
    public int getCount() {
        return al_datas.length;
    }

    @Override
    public Object getItem(int i) {
        return al_datas[i];
    }

    @Override
    public long getItemId(int i) {
        return i;
    }

    @Override
    public View getView(int i, View view, ViewGroup viewGroup) {
        View v = View.inflate(context, R.layout.item_gv_start_huli_pop, null);
        TextView tv = (TextView) v.findViewById(R.id.tv_gv_start_huli_pop);
        tv.setText(al_datas[i]);
        return v;
    }
}
